//
//  MineMessageCell.swift
//  HappyEat
//
//  Created by ctx2016 on 17/1/12.
//  Copyright © 2017年 陌路是我. All rights reserved.
//

import UIKit

class MineMessageCell: UITableViewCell {
    
    var titleLabel:UILabel = UILabel.init()
    
    var timeLabel:UILabel = UILabel.init()
    
    var shawDowView:UIView = UIView.init()

    override func awakeFromNib() {
        super.awakeFromNib()
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
    }
    override func layoutSubviews() {
        super.layoutSubviews()
    }
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.setUI()
    }
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
}
extension MineMessageCell {
    func setUI(){
        self.contentView.addSubview(self.titleLabel)
        self.contentView.addSubview(self.timeLabel)
        self.contentView.addSubview(self.shawDowView)
        self.titleLabel.snp.makeConstraints { (make) in
            make.left.equalTo(16)
            make.top.equalTo(12)
            make.height.equalTo(16)
            make.right.equalTo(-16)
        }
        self.timeLabel.snp.makeConstraints { (make) in
            make.left.equalTo(0)
            make.right.equalTo(-16)
            make.top.equalTo(self.titleLabel.snp.bottom).offset(10)
            make.height.equalTo(14)
        }
        self.shawDowView.snp.makeConstraints { (make) in
            make.left.equalTo(0)
            make.bottom.equalTo(0)
            make.right.equalTo(0)
            make.height.equalTo(0.5)
        }
        self.timeLabel.textAlignment = .right
        self.titleLabel.font = UIFont.systemFont(ofSize: 16)
        self.timeLabel.font = UIFont.systemFont(ofSize: 14)
        self.timeLabel.textColor = .lightGray
        self.shawDowView.backgroundColor = .lightGray
    }
}
